package cn.bdqn.fast.utils;

import java.util.List;

/**
 * 分页工具类
 */
public class Page<T> {
    private long pageNumber; //当前页码
    private long pageSize; //每页数量
    private long count; //总数量
    private long pageCount; //总页数
    private List<T> data; //数据

    public long getPageNumber() {
        return pageNumber;
    }

    public void setPageNumber(long pageNumber) {
        this.pageNumber = pageNumber;
    }

    public long getPageSize() {
        return pageSize;
    }

    public void setPageSize(long pageSize) {
        this.pageSize = pageSize;
    }

    public long getCount() {
        return count;
    }

    public void setCount(long count) {
        this.count = count;
        this.pageCount = new Double(Math.ceil(1.0 * count / pageSize)).longValue();
    }

    public long getPageCount() {
        return pageCount;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }
}
